package com.mrogrape.notepad.activity.action.item;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.Action;

import com.mrogrape.notepad.activity.MainFrame;
import com.mrogrape.notepad.ui.editor.ContentType;


public class NewPlainTextMenuItemAction extends AbstractAction {

    /** serialVersionUID */
    private static final long serialVersionUID = -1L;

    public NewPlainTextMenuItemAction(MainFrame frame){

	this.frame = frame;
	super.putValue(Action.NAME, "Plain Text");
	super.putValue(Action.SHORT_DESCRIPTION, "Create a new plain text editor.");
    }

    @Override
    public void actionPerformed(ActionEvent arg0) {

	this.frame.createNewEditor(ContentType.PLAIN_TEXT);
    }

    private MainFrame frame;
}
